<?
function logRank($upDwn,$linkID,$currentRank) {
	global $newRankString, $dbname, $db, $db_selected;
	
	if ($upDwn == 'up')       { $newRank = $currentRank+1; }
	elseif ($upDwn == 'down') { $newRank = $currentRank-1; }
	
	// Update link
	$sql = "UPDATE transLinks SET RankTotal = '$newRank', Ranks = (Ranks+1)
			WHERE LinkID = '$linkID'";
	$result = mysql_db_query($dbname,$sql);		
	
	$newRankString = $newRank.'|'.$linkID.'|'.$sql;
	
	return $newRankString;
}

?>